home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 9372 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  989 b 

  1. Path: news.cybertron.com!usenet
  2. From: erowe@mail.bayou.com (Eddie Rowe)
  3. Newsgroups: comp.lang.c
  4. Subject: Watcom String Initialization
  5. Date: Sat, 09 Mar 96 23:39:01 GMT
  6. Organization: CyberTron, Inc.
  7. Message-ID: <N.030996.173901.65@mail>
  8. NNTP-Posting-Host: p27.bayou.com
  9. X-Newsreader: Quarterdeck Message Center [1.0]
  10.  
  11. Has anyone experienced any problems with strings initialization when using 
  12. Watcom's compiler?  I have run into incidents where LOCAL strings are not being 
  13. initialized correctly.  I can add = "" to the end of the declaration and force 
  14. the string to be initialized, but wondered if there was something unique to 
  15. Watcom and its handling of strings?
  16.  
  17. char SomeString[20]; /*String not always initialized correctly*/
  18. char SomeString[20] = ""; /*String IS always initialized correctly*/
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25. on multiple calls to the function.
  26.  
  27.  I have a local character string in a function that is called multiple times 
  28. and unless I define the string as below Watcom seems to keep the 
  29.  
  30.